// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	10/9/2014 12:07:25 PM				
// -----------------------------

#ifndef _Window_h
#define _Window_h

#include "Common.h"

class Application;

class Window
{
public:
	friend class Application;

	Window(Application* lpApp);
	~Window();

	Bool	Init(GameConfig& config);

	Bool	HandleMessages() const;

	Bool	IsAlive() const;
	Bool	IsActive() const;

	HWND	GetHandle() const;
	UInt32	GetWidth() const;
	UInt32	GetHeight() const;
	Bool	IsFullscreen() const;

private:

	static LRESULT WINAPI	WndProcWrapper(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	LRESULT					WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	Application*	m_lpApp;
	HWND			m_hWindow;
	DWORD			m_dwWindowStyle;

	Bool			m_IsAlive;
	Bool			m_IsActive;

	TString			m_Caption;
	UInt32			m_Width;
	UInt32			m_Height;
	Bool			m_IsFullscreen;

	Window(const Window& refWindow);
	Window& operator=(const Window& refWindow);
};

#endif